package oop3.pet;

//宠物医生
public class PetDoctor {
	private String name;

	public PetDoctor(String n) {
		this.name = n;
	}

	// 给宠物看病
	public void cure(Pet c) {
		System.out.println("医生观察" + c.getName() + ":");
		// 如果是鳄鱼，把嘴捆起来
		if (c instanceof Crocodile) {
			System.out.println("把鳄鱼嘴捆起来");
		}
		c.show();
		c.cry();
		if (c.getHealth() > 80) {
			System.out.println("没病，走两步！！");
			return;
		}
		System.out.println(name + "给宠物  " + c.getName() + "看病");
		System.out.println("量体温，做检查，开药");
		System.out.println(c.getName() + "慢慢的康复了。。。");
		c.setHealth(c.getHealth() + 20);
		System.out.println(c.getName() + "健康值是" + c.getHealth());
	}

	// // 给小猫看病
	// public void cure(Cat c) {
	// c.show();
	// System.out.println(name + "给小猫" + c.getName() + "看病");
	// System.out.println("量体温，做检查，开药");
	// c.setHealth(c.getHealth() + 10);
	// }
	//
	// public void cure(Crocodile c) {
	// c.show();
	// System.out.println(name + "给鳄鱼" + c.getName() + "看病");
	// System.out.println("量体温，做检查，开药");
	// c.setHealth(c.getHealth() + 10);
	// }
	//
	// public void cure(Snake c) {
	// c.show();
	// System.out.println(name + "给蛇 " + c.getName() + "看病");
	// System.out.println("量体温，做检查，开药");
	// c.setHealth(c.getHealth() + 10);
	// }
}
